/**
 * 
 */
package com.cqan.account.rest;

import javax.ws.rs.FormParam;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.HttpHeaders;

import com.cqan.account.entity.resp.FavoritePageResp;
import com.cqan.account.entity.resp.FavoriteResp;
import com.cqan.common.ResultResp;

/**
 * @Description 用户收藏REST接口
 * @author slaton.wu@gmail.com
 * @date 2012-7-19下午2:19:29
 *
 */
@Path("/favorite")
public interface FavoriteRestService {

	/**
	 * 获取一条收藏信息
	 * @param id
	 * @return
	 */
	@GET
	@Path("/getFavorite/{id}")
	public FavoriteResp getFavorite(@PathParam("id")Long id,@Context HttpHeaders headers);
	
	/**
	 * 收藏节点
	 * @param nid
	 * @return
	 */
	@POST
	@Path("/addFavorite")
	public ResultResp addFavorite(@FormParam("nid")Long nid,@Context HttpHeaders headers);
	
	/**
	 * 删除节点
	 * @param nid
	 * @return
	 */
	@POST
	@Path("/deleteFavorite")
	public ResultResp deleteFavorite(@FormParam("id")Long id,@Context HttpHeaders headers);
	
	/**
	 * 获取用户收藏列表
	 * @return
	 */
	@GET
	@Path("/favoriteList")
	public FavoritePageResp favoriteList(@Context HttpHeaders headers);
}
